package com.nf.emtiy;

public class Foodfactory {
    public static Food factory(String name){
        if ("apple".equals(name)){
            return new Apple();
        }else if ("banana".equals(name)){
            return new Banana();
        }else {
            return null;
        }
    }
}
